<?php
require('../../cofd/common.php');
$new = $_GET['new'];
$sql = "SELECT * FROM `exam_users`";
$retu = $conn->query($sql);
$row = $retu->fetch_assoc();
$yuser = $row['username'];
$sql = "UPDATE `exam_users` SET `password`='$new' WHERE `username`='$yuser'";
if($conn->query($sql) === TRUE){
    header("HTTP/1.1 200 OK");
}else{
    header("HTTP/1.1 500 Internal Server Error");
}
$conn->close();